package com.huawei.rbac.design.absfactory;

/**
 * 抽象工厂模式测试类
 * @author 罗华
 * @date 2021/4/20
 */
public class AbsFactoryTest {

    public static void main(String[] args) {

        Provider provider = new MailSenderFactory();
        Sender sender = provider.produce();
        sender.send();

        SmsSenderFactory factory = new SmsSenderFactory();
        Sender produce = factory.produce();
        produce.send();

        AbsDemoFactory absDemoFactory = new AbsDemoFactory();
        Sender produce1 = absDemoFactory.produce();
        produce1.send();
    }
}
